package org.javaboy.list_mq_demo.task;

import org.javaboy.list_mq_demo.consumer.MyConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class MyCommandLineRunner implements CommandLineRunner {
    @Autowired
    MyConsumer myConsumer;
    @Override
    public void run(String... args) throws Exception {
        myConsumer.blockReceive();
    }
}
